/*
 * blogcircle.cpp
 *
 *  Created on: Jul 30, 2010
 *      Author: nintang
 */
#include "blogcircle.h"

blogcircle::blogcircle(QWidget *parent)
    : QWidget(parent)
{
	//setWindowFlags(Qt::WindowSoftkeysVisibleHint);
	QLabel *labelCircle=new QLabel(this);
	labelCircle->setGeometry(QRect(0,0, 360, 54));
	labelCircle->setStyleSheet("background-image: url(:/images/26.png);");	
	this->setStyleSheet("QTabWidget::pane { border:0px;}"
			"QTabBar::tab { background-image:url(:/images/28.png);  width:180px; height:50px; color: black; font:bold 20px;}"
			"QTabBar::tab:selected { background-image:url(:/images/27.png); border-style: none ;}");			
	QTabWidget *tabWidget=new QTabWidget(this);
	tabWidget->setGeometry(QRect(0, 54, 360, 526));
	tabWidget->setFocusPolicy(Qt::NoFocus);
	QWidget *tab1=new QWidget();
	QWidget *tab2=new QWidget();
	tabWidget->addTab(tab1,QString());
	tabWidget->addTab(tab2,QString());
	tabWidget->setTabText(tabWidget->indexOf(tab1), QApplication::translate("blogcircle", "\345\205\263\346\263\250\345\210\227\350\241\250", 0, QApplication::UnicodeUTF8));
	tabWidget->setTabText(tabWidget->indexOf(tab2), QApplication::translate("blogcircle", "\347\262\211\344\270\235\345\210\227\350\241\250", 0, QApplication::UnicodeUTF8));
	QListWidget *listWidget=new QListWidget(tab1);
	listWidget->setStyleSheet("background-color:transparent;border:0px;");
	listWidget->setFixedWidth(360);
	listWidget->setMinimumHeight(478);
	listWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	//listWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	listWidget->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);	
	QListWidgetItem *listitem1=new QListWidgetItem(listWidget);
	listitem1->setSizeHint(QSize(360,57)); 
	blogcirclelist *blogcirclelist1=new blogcirclelist(1,0);
	listWidget->setItemWidget(listitem1,blogcirclelist1);
	QListWidgetItem *listitem2=new QListWidgetItem(listWidget);
	listitem2->setSizeHint(QSize(360,57)); 
	blogcirclelist *blogcirclelist2=new blogcirclelist(2,0);
	listWidget->setItemWidget(listitem2,blogcirclelist2);
	QListWidgetItem *listitem3=new QListWidgetItem(listWidget);
	listitem3->setSizeHint(QSize(360,57)); 
	blogcirclelist *blogcirclelist3=new blogcirclelist(3,0);
	listWidget->setItemWidget(listitem3,blogcirclelist3);
	QListWidgetItem *listitem4=new QListWidgetItem(listWidget);
	listitem4->setSizeHint(QSize(360,57)); 
	blogcirclelist *blogcirclelist4=new blogcirclelist(4,0);
	listWidget->setItemWidget(listitem4,blogcirclelist4);
	QListWidgetItem *listitem5=new QListWidgetItem(listWidget);
	listitem5->setSizeHint(QSize(360,57)); 
	blogcirclelist *blogcirclelist5=new blogcirclelist(5,0);
	listWidget->setItemWidget(listitem5,blogcirclelist5);
	QListWidgetItem *listitem6=new QListWidgetItem(listWidget);
	listitem6->setSizeHint(QSize(360,57)); 
	blogcirclelist *blogcirclelist6=new blogcirclelist(6,0);
	listWidget->setItemWidget(listitem6,blogcirclelist6);
	QListWidgetItem *listitem7=new QListWidgetItem(listWidget);
	listitem7->setSizeHint(QSize(360,57)); 
	blogcirclelist *blogcirclelist7=new blogcirclelist(7,0);
	listWidget->setItemWidget(listitem7,blogcirclelist7);
	QListWidgetItem *listitem8=new QListWidgetItem(listWidget);
	listitem8->setSizeHint(QSize(360,57)); 
	blogcirclelist *blogcirclelist8=new blogcirclelist(8,0);
	listWidget->setItemWidget(listitem8,blogcirclelist8);
	QListWidgetItem *listitem9=new QListWidgetItem(listWidget);
	listitem9->setSizeHint(QSize(360,57)); 
	blogcirclelist *blogcirclelist9=new blogcirclelist(9,0);
	listWidget->setItemWidget(listitem9,blogcirclelist9);
	QListWidgetItem *listitem10=new QListWidgetItem(listWidget);
	listitem10->setSizeHint(QSize(360,57)); 
	blogcirclelist *blogcirclelist10=new blogcirclelist(10,0);
	listWidget->setItemWidget(listitem10,blogcirclelist10);

	//back = new QAction(tr("Back"), this);
	//back->setSoftKeyRole(QAction::NegativeSoftKey);
	//connect(back, SIGNAL(triggered()), this, SLOT(backtobloghomepage()));
	//addAction(back);		
	QPushButton *pushButtonRight=new QPushButton(this);
	pushButtonRight->setGeometry(QRect(0, 580, 180, 60));	
	pushButtonRight->setStyleSheet("border-image:url(:/images/56.png);border:0px;");
	QPushButton *pushButtonLeft=new QPushButton(this);
	pushButtonLeft->setGeometry(QRect(180, 580, 180, 60));	
	pushButtonLeft->setStyleSheet("border-image:url(:/images/57.png);border:0px;");
	connect(pushButtonLeft, SIGNAL(clicked()), this, SLOT(backtobloghomepage()));				
}

blogcircle::~blogcircle()
{

}
void blogcircle::backtobloghomepage()
{
    bloghomepage *w=new bloghomepage(1,0);
    w->showFullScreen(); 
    this->~blogcircle();
}



